package com.yxdj.user.api.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxdj.common.core.annotation.Excel;
import com.yxdj.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 用户信息对象 user
 *
 * @author mty
 * @date 2025-03-18
 */
@Data
@Schema(description = "User类")
public class User extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户唯一标识 */
    @Schema(description = "用户唯一标识")
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 用户手机号 */
    @Excel(name = "用户手机号")
    @Schema(description = "用户手机号")
    private String phoneNumber;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    @Schema(description = "用户昵称")
    private String nickname;

    /** 用户性别 */
    @Excel(name = "用户性别")
    @Schema(description = "用户性别")
    private Long gender;

    /** 用户生日 */
    @Excel(name = "用户生日")
    @Schema(description = "用户生日")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    /** 用户头像地址 */
    @Excel(name = "用户头像地址")
    @Schema(description = "用户头像地址")
    private String avatarUrl;

    /** 用户状态 */
    @Excel(name = "用户状态")
    @Schema(description = "用户状态")
    private Long status;

    @Schema(name = "用户地址信息")
    @TableField(exist = false)
    private List<Address> addressList;
}
